#define _CRT_SECURE_NO_WARNINGS  1
#include <stdio.h>
int main() {
    long long int a = 0;
    long long int b = 0;
    while (scanf("%lld%lld", &a, &b) != EOF)
    {
        long long int i = 0;
        long long int count = 0;
        while (i * i <= b)
        {
            if ((i + 1) * (i + 1) < a)
            {
                i += 2;
                continue;
            }
            else if (i * i < a)
            {
                count += (i + 1) * (i + 1) - a;
                i += 2;
                continue;
            }
            if ((i + 1) * (i + 1) < b)
            {
                count += (i + 1) * (i + 1) - i * i;
            }
            else
            {
                count += b - i * i + 1;
            }
            i += 2;
        }
        printf("%lld", count);
    }
    return 0;
}